using Config;
using MoonFramework.Buff;
using MoonFramework.Scripts.Pool;

namespace Entity.Monster
{
    public abstract class Monster : Actor
    {
        public MonsterConfig MonsterConfig;
        public MonsterObject MonsterObject;
        
        public virtual void Init(ActorViewController viewController)
        {
            Init(null, viewController);
            buffFsm = ObjPoolManager.Instance.Pop(() => new BuffFsm(), fsm => fsm.Init(this));
            MonsterObject = ((MonsterViewController)viewController).gameObject.GetComponent<MonsterObject>();
            MonsterObject.OnInit(this);
        }
    }
}